﻿namespace MEFAddin
{
    using MEFAddin.Adapters;
    using MEFAddin.Interfaces;

    public abstract class AddInCommandBase : IAddInCommand
    {
        public IAddInController Controller { get; set; }

        public ILoggingAdapter LoggingAdapter { get; set; }

        public IWindowAdapter WindowAdapter { get; set; }

        /// <summary>
        /// Gets the name of the command bar.
        /// </summary>
        /// <value>
        /// The name of the command bar.
        /// </value>
        public abstract string CommandBarName { get; }

        /// <summary>
        /// Gets the name.
        /// </summary>
        public abstract string Name { get; }

        /// <summary>
        /// Gets the text.
        /// </summary>
        public abstract string Text { get; }

        /// <summary>
        /// Gets the tool tip.
        /// </summary>
        public abstract string ToolTip { get; }

        /// <summary>
        /// Gets or sets the command instance.
        /// </summary>
        /// <value>
        /// The command instance.
        /// </value>
        public dynamic CommandInstance { get; set; }

        /// <summary>
        /// Gets the bindings.
        /// </summary>
        public virtual string Bindings
        {
            get { return null; }
        }

        /// <summary>
        /// Executes this instance.
        /// </summary>
        public virtual void Execute()
        {
        }

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        public virtual void Initialize()
        {
        }
    }
}
